package com.zhangbo.study.designpatternlearning.factory.store;

import com.zhangbo.study.designpatternlearning.factory.Pizza;
import com.zhangbo.study.designpatternlearning.factory.PizzaEnum;
import com.zhangbo.study.designpatternlearning.factory.PizzaStore;
import com.zhangbo.study.designpatternlearning.factory.pizza.chicago.ChicagoStyleCheesePizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.chicago.ChicagoStyleClamPizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.chicago.ChicagoStylePepperoniPizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.chicago.ChicagoStyleVeggiePizza;

public class ChicagoPizzaStore extends PizzaStore {
    @Override
    public Pizza createPizza(PizzaEnum pizzaEnum) {
        switch (pizzaEnum) {
            case CHEESE:
                return new ChicagoStyleCheesePizza();
            case PEPPERONI:
                return new ChicagoStylePepperoniPizza();
            case CLAM:
                return new ChicagoStyleClamPizza();
            case VEGGIE:
                return new ChicagoStyleVeggiePizza();
        }
        return null;
    }
}
